{extend name="../../admin/view/main"}
{block name="button"}
<!--{if auth("add")}-->
<button data-modal='{:url("add")}' data-title="添加柜点" class='layui-btn layui-btn-sm layui-btn-primary'>添加柜点</button>
<!--{/if}-->

<!--{if auth("remove")}-->
<button data-action='{:url("remove")}' data-rule="id#{key}" data-confirm="确定要删除这些柜点吗？" class='layui-btn layui-btn-sm layui-btn-primary'>删除柜点</button>
<!--{/if}-->
{/block}

{block name="content"}
<div class="think-box-shadow table-block">
    {include file='store/index_search'}
    <table class="layui-table margin-top-10" lay-filter="demo" lay-even lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th lay-data="{fixed:'left', field:'id', type:'checkbox', width:20}" class='list-table-check-td think-checkbox'>
                <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
            </th>
            <th class='nowrap'>#</th>
            <th class='nowrap'>柜点名称</th>
            <th class='nowrap'>省/市/区</th>
            <th class='nowrap'>详细地址</th>
<!--            <th class='nowrap'>开箱率</th>-->
<!--            <th class='nowrap'>柜点类型</th>-->
            <th class='nowrap'>联系人姓名</th>
            <th class='nowrap'>联系人电话</th>
            <th class='nowrap'>营业时间</th>
            <th class='nowrap'>昨日订单时长</th>
<!--            <th class='nowrap'>备注</th>-->
            {if auth('edit')}<th class='nowrap'>操作</th>{/if}
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td class='list-table-check-td think-checkbox'>
                <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
            </td>
            <td class="nowrap">{$vo.id}</td>
            <td class="nowrap">{$vo.name}</td>
            <td class="nowrap">{$vo.area}</td>
            <td class="nowrap">{$vo.address}</td>
<!--            <td class="nowrap">{$vo.kxl|default=0}%</td>-->
<!--            <td class="nowrap">{$store_types[$vo.store_type]|default=""}</td>-->
            <td class="nowrap">{$vo.contacts}</td>
            <td class="nowrap">{$vo.contact_number}</td>
            <td class="nowrap">{$vo.start_hours} - {$vo.end_hours}</td>
            <td class="nowrap">{$vo.order_times|default=0}</td>
<!--            <td class="nowrap">{$vo.remark}</td>-->
            {if auth('edit')}
            <td class="nowrap">
                <!--{if auth("share")}-->
                <a class="layui-btn layui-btn-sm layui-btn-normal" data-title="设置柜点【{$vo.name}】的分成比例" data-modal="{:url('store/share')}?id={$vo.id}">分成</a>
                <!--{/if}-->
                <!--{if auth("edit")}-->
                <a class="layui-btn layui-btn-sm" data-modal="{:url('store/edit')}?id={$vo.id}">编辑</a>
                <!--{/if}-->

                <!--{if auth("remove")}-->
                <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除这些设备吗？" data-action="{:url('remove')}" data-value="id#{$vo.id};status#0">删除</a>
                <!--{/if}-->
            </td>
            {/if}
        </tr>
        {/foreach}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}